-
Notifications
You must be signed in to change notification settings - Fork 4
add method to create a party + lobby dto #472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements lobby creation functionality for the duel/party system, enabling users to create lobbies with unique join codes that other players can use to join games.
Key Changes:
- Introduced
PartyCodeGeneratorutility for generating 6-character alphanumeric join codes with collision detection - Added
LobbyDtofor structured lobby data transfer - Implemented the
createPartyendpoint inDuelControllerthat creates a lobby and associates the creator as the first player
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
PartyCodeGenerator.java |
New utility class for generating unique random party codes with configurable retry logic |
LobbyDto.java |
New DTO that maps Lobby entities to API response format with all relevant fields |
DuelController.java |
Added createParty endpoint with authentication, duplicate lobby checks, and lobby/player creation logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/com/patina/codebloom/common/util/PartyCodeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/com/patina/codebloom/common/util/PartyCodeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/com/patina/codebloom/api/duel/DuelController.java
Outdated
Show resolved
Hide resolved
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/com/patina/codebloom/common/util/PartyCodeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/com/patina/codebloom/api/duel/DuelController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/patina/codebloom/api/duel/DuelController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/patina/codebloom/api/duel/DuelController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/patina/codebloom/common/util/PartyCodeGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/com/patina/codebloom/common/util/PartyCodeGenerator.java
Outdated
Show resolved
Hide resolved
3a9c560 to
516cfe4
Compare
|
src/main/java/com/patina/codebloom/common/utils/duel/PartyCodeGenerator.java
Show resolved
Hide resolved
src/main/java/com/patina/codebloom/api/duel/DuelController.java
Outdated
Show resolved
Hide resolved
266001c to
0e50608
Compare
|
|
d3ca19d to
29aad3d
Compare
|
|
|
a random code generator
Update src/main/java/com/patina/codebloom/api/duel/DuelController.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> nits
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
b6a2ee1 to
31da6bc
Compare
|
-created a joincode generator ( will be replaced later)